package edu.whu.webgis.service.impl;

import edu.whu.webgis.entity.Comment;
import edu.whu.webgis.mapper.CommentMapper;
import edu.whu.webgis.service.ICommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements ICommentService {

    @Autowired
    CommentMapper dao;

    @Override
    public List<Comment> getCommentsByPid(Integer uid) {
        return dao.selectByPid(uid);
    }

    @Override
    public int insertComment(Comment comment) {
        return dao.insert(comment);
    }
}
